package org.jeecg.trace.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.lettuce.core.dynamic.annotation.Param;
import org.apache.ibatis.annotations.Mapper;
import org.jeecg.trace.dto.BarCodeTraceDTO;
import org.jeecg.trace.dto.MaterialHistoryDTO;
import org.jeecg.trace.dto.ProcHistoryDTO;
import org.jeecg.trace.dto.QisDefectsDTO;
import org.jeecg.trace.entity.MesMaterialSet;
import org.jeecg.trace.entity.MesStatusWordValue;
import org.jeecg.trace.entity.MesStatusbitCfg;
import org.jeecg.trace.entity.MesUnitid;

import java.util.List;

@Mapper
public interface BarCodeTraceMapper {
    IPage<BarCodeTraceDTO> queryByCode(Page<BarCodeTraceDTO> page, @Param("code") String code);

    List<String> getChildrenCode(@Param("codeList") List<String> codeList);

    List<MaterialHistoryDTO> queryMaterialHistoryByCode(@Param("list")List<String> list);

    IPage<MesMaterialSet> mesMaterialSetByProduct(Page<MesMaterialSet> page, @Param("list") List<String> list);

    List<ProcHistoryDTO> queryProcHistoryByCode(@Param("list")List<String> list);

    MesStatusWordValue getMesStatusWordValueById(@Param("historyId")String historyId);

    List<MesStatusbitCfg> getMesStatusbitCfgList(@Param("wordid")String wordid);

    List<QisDefectsDTO> listQisDefectsByMainId(@Param("list") List<String> list);

    IPage<MesUnitid> listMesUnitIdByUnitsn(Page<MesUnitid> page,@Param("list")List<String> list);
}
